<?xml version="1.0" encoding="ISO-8859-1" ?>

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:rich="http://richfaces.org/rich"
	  xmlns:a4j="http://richfaces.org/a4j"
	  xmlns:easy="http://easyfaces.com.br/easyfaces">
	
	<f:subview id="subviewManterPais">
		<rich:modalPanel id="manterPais" autosized="true"  headerClass="height:20px;" resizeable="false" >
			<f:facet name="header">
				<h:outputText value="#{bundle.pais_titulo_manter}" />
			</f:facet>
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/images/close.gif" styleClass="botao_fechar_popup" id="hideLink">
						<rich:componentControl for="manterPais" attachTo="hideLink" operation="hide" event="onclick" />
					</h:graphicImage>
				</h:panelGroup>
			</f:facet>
			<b><font color="red"><rich:messages id="msgPaisManter"></rich:messages></font></b>
			<a4j:form ajaxSubmit="true" id="formPaisManter" reRender="pais_codigo, pais_descricao, pais_ddi">
			
                <h:panelGrid columns="2" width="550px">
                	<h:outputLabel value="#{bundle.pais_codigo}" for="pais_codigo" />
                    <h:inputText id="pais_codigo" value="#{paisBackBean.paisFormBean.paisManter.codigo}" label="#{bundle.pais_codigo}" readonly="true" disabled="#{paisBackBean.paisFormBean.isDisabled}" size="5" />
                    
                	<h:outputLabel style="color:red;" value="#{bundle.pais_descricao} * " for="pais_descricao"  />
                    <h:inputText id="pais_descricao" value="#{paisBackBean.paisFormBean.paisManter.descricao}"  label="#{bundle.pais_descricao}" disabled="#{paisBackBean.paisFormBean.isDisabled}"  maxlength="50" size="40" />
                    
                    <h:outputLabel style="color:red;" value="#{bundle.pais_ddi} * " for="pais_ddi" />
                    <easy:inputMask id="pais_ddi" value="#{paisBackBean.paisFormBean.paisManter.ddi}"   required="false" submitWithMask="false"  mask="999" useMask="true" useValidate="false" useMaskSize="true" placeHolder="_" disabled="#{paisBackBean.paisFormBean.isDisabled}" size="5" />                   
              
                </h:panelGrid>
                
                <div class="linha"/>
                <h:outputLabel value="#{bundle.campos_obrigatorios} (*) " style="color:red;"/>  
               <div class="linha"/>
                <a4j:commandButton action="#{paisBackBean.manterPais}" value="#{bundle.pais_btn_gravar}" id="btnGravar" reRender="gridPais" disabled="#{paisBackBean.paisFormBean.isDisabled}" />
                <a4j:commandButton action="#{paisBackBean.excluirPais}" value="#{bundle.pais_btn_excluir}" id="btnExcluir" reRender="gridPais" disabled="#{!paisBackBean.paisFormBean.isDisabled}" >
                	<rich:componentControl for="manterPais" attachTo="btnExcluir" operation="hide" event="onclick" />
                </a4j:commandButton>
                <a4j:commandButton value="#{bundle.pais_btn_voltar}" id="btnVoltar" action="#{paisBackBean.obterListaPais}" reRender="gridPais" >
                	<rich:componentControl for="manterPais" attachTo="btnVoltar" operation="hide" event="onclick" />
                </a4j:commandButton>
					
			</a4j:form>

		</rich:modalPanel>
	</f:subview>

</html>